package gov.pbc.nn.kjgl.jfcr.handler;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import com.bstek.uflo.env.Context;
import com.bstek.uflo.model.ProcessInstance;
import com.bstek.uflo.process.handler.AssignmentHandler;
import com.bstek.uflo.process.node.TaskNode;
/**
 * 方法没有用到。。。。可以以后用
 * @author jack.zhao
 *
 */
@Component("jfcr.reAssigementHandler")
public class ReAssigementHandler implements AssignmentHandler {

	@Override
	public Collection<String> handle(TaskNode tasknode, ProcessInstance process, Context context) {
		List<String> handelrs = new ArrayList<String>();
		List<String> users = new ArrayList<String>();
		users.add("admin");
		users.add("chuzhang");
		users.add("kezhang");
		
		Map<String, Object> map = new HashMap<String, Object>();
		for (String u : users) {
			Integer userresult = (Integer) context.getProcessService().getProcessVariable(u, process);
			if (userresult.equals(-1)) {
				handelrs.add(u);
			}
		}
		return handelrs;
	}

}
